/* Root Variables */
:root {
  --bg: #1f2233;
  --fg: #e6e6e6;
  --accent: #1592FF;
  --panel-bg: #232637D9;
  --btn-hover: #2d3240F2;
  --border-color: #ffffff14;
  --card-bg: #232637E6;
  --card-border: #ffffff0D;
  --shadow-color: #00000066;
  --transition-speed: 0.3s;
  --border-radius: 16px;
  --glow-color: #1592FF;
  --status-width: 90px;
  --status-height: 28px;
  --mona: #001A31;
}

/* Body & Layout */
body {
  margin: 0;
  padding: 2rem 0;
  background: linear-gradient(135deg, #1f2233, #14172b);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Dashboard Grid */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px;
  border-radius: var(--border-radius);
  background: var(--panel-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 20px rgba(0,153,255,0.12);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.dashboard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
  filter: blur(12px);
  animation: dashboardGlow 12s ease-in-out infinite;
  z-index: 0;
}

@keyframes dashboardGlow {
  0%,100% { opacity:0.2; }
  50% { opacity:0.35; }
}

/* Status Indicators */
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  background: var(--card-bg);
  box-shadow: 0 4px 14px var(--shadow-color);
  font-size: 14px;
  color: var(--fg);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), background var(--transition-speed);
}

.status-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.status-indicator {
  font-weight: 600;
  border-radius: 12px;
  width: var(--status-width);
  height: var(--status-height);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  text-align: center;
  color: var(--fg);
  background: rgba(93,173,226,0.15);
}

.status-indicator.enabled { background: rgba(0,153,255,0.2); color: var(--accent); }
.status-indicator.disabled { background: rgba(220,80,80,0.25); color: #FF4C4C; }
.status-indicator.neutral { background: rgba(120,120,120,0.25); color: #0ED000; }

/* Buttons */
.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.btn {
  position: relative;
  width: 100%;
  height: 100px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 6px 20px var(--shadow-color);
  cursor: pointer;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), background var(--transition-speed);
}

.btn:hover {
  background: var(--btn-hover);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px var(--shadow-color);
}

.btn:active {
  transform: scale(0.95);
  opacity: 0.85;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, var(--glow-color) 0%, transparent 70%);
  filter: blur(8px);
  opacity: 0.25;
  transform: scale(1.05);
  animation: softPulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes softPulse {
  0%,100% { opacity:0.25; transform:scale(1.05); }
  50% { opacity:0.35; transform:scale(1.1); }
}

.btn .icon {
  position: absolute;
  inset: 0;
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.2;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn:hover .icon {
  opacity: 0.25;
  transform: scale(1.05);
}

.btn span:not(.icon) {
  position: relative;
  z-index: 2;
}

/* Modal Styles */
#modal-content.fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

#modal-output.fullscreen {
  background: var(--panel-bg);
  flex: 1;
  overflow-y: auto;
  font-size: 0.9rem;
  white-space: pre-wrap;
  padding: 1rem;
  border-radius: var(--border-radius);
  color: var(--fg);
}

#modal-output::-webkit-scrollbar {
  width: 8px;
}
#modal-output::-webkit-scrollbar-track { background: var(--panel-bg); }
#modal-output::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* Utility Styles */
.hidden { display:none!important; }

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive Design */
@media(max-width:600px){
  .btn { height:80px; }
  .btn .icon { font-size:4rem; }
  .dashboard { grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); }
}

/* Title & Subtitle */
.title-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding-top: 10px;
  margin-bottom: 0.5rem;
  position: relative;
}

.title {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(255, 126, 185, 0.3);
  animation: fadeInDown 0.8s ease;
}

.subtitle {
  font-size: 0.95rem;
  opacity: 0.75;
  font-style: italic;
  letter-spacing: 0.3px;
  color: var(--fg);
  animation: fadeInUp 1.2s ease;
}

/* Language Dropdown */
#lang-dropdown {
  appearance: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--fg);
  border-radius: var(--border-radius);
  padding: 8px 14px;
  font-size: 0.9rem;
  margin-top: 12px;
  box-shadow: 0 4px 14px var(--shadow-color);
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur));
  transition: background var(--transition-speed), transform 0.3s ease;
}

#lang-dropdown:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
}

#lang-dropdown:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(255, 126, 185, 0.25);
}

/* Subtle animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Title Scaling */
l@media (max-width: 600px) {
  .title { font-size: 1.8rem; }
  .subtitle { font-size: 0.85rem; }
  #lang-dropdown { font-size: 0.85rem; }
}